package com.enqualcomm.kids.network;

import com.android.volley.NetworkResponse;

import common.utils.GsonFactory;
import common.utils.MyLogger;

/**
 * Created by yinzhiqun on 2015/10/17.
 *
 */
public class Parser {

    public static <T> T parse(NetworkResponse networkResponse,Class<T> clazz){
        String json = new String(networkResponse.data);
        MyLogger.jLog().i(json);
       return GsonFactory.newInstance().fromJson(json, clazz);
    }
}
